FROM anapsix/alpine-java:8_server-jre_unlimited

MAINTAINER xuhuixu@hailiang.com

ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"

RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN mkdir -p /daoism-daemon-elastic-job

WORKDIR /daoism-daemon-elastic-job

EXPOSE 5002

ADD ./target/daoism-daemon-elastic-job.jar ./

CMD sleep 120;java $JAVA_OPTS -jar daoism-daemon-elastic-job.jar
